
<%@page import="controller.Utils"%>
<%@page import="java.text.NumberFormat"%>
<%@page import="models.Domain"%>
<%@page import="com.googlecode.objectify.Query"%>
<%
Query<Domain> list = (Query<Domain>) request.getAttribute("list");
String ip = (String) request.getAttribute("ip");
NumberFormat nf = NumberFormat.getInstance();
String title = "Ip "+ip;
String description = "Ip "+ip+" .The website has the same ip "+ip;
String keywords = ip+",ip,related site,infomation site";
%>
<jsp:include page="/layout/header.jsp">
	<jsp:param name="title" value="<%=title %>"/>
	<jsp:param name="description" value="<%=description %>"/>
	<jsp:param name="keywords" value="<%=keywords %>"/>
	<jsp:param name="index" value="true"/>
</jsp:include>
		<div class="body">
			<div class="body_left">
				<div class="top_left">
					<%@ include file='/adv/left.jsp'%>
				</div>
				
				<div class="top_left">
					<%@ include file='/adv/left.jsp'%>
				</div>
				
			</div>
			<div class="body_right">
				<div class="top">
					<%=ip %>
					
				</div>
				<div class="content padding">
					<form action="/si" class="s_whois">
						<input type="text" name="ip" value="67.205.109.33" onclick="javascript:this.value = ''"/>
						<button>Infomation Ip</button>
					</form>
					<div class="adv_menu">
						<%@ include file='/adv/menu.jsp'%>
					</div>
					<hr size="1"/>
					<h2>Domain same ip <%=ip %></h2>
					<%
					String string = "";
					
					string += "<table class='table' cellpadding=\"0\" cellspacing=\"0\">";
					string += "<tr>";
					string += "<th class='text_left'>";
					string += "Domain";
					string += "</th>";
					string += "<th>";
					string += "Speed site";
					string += "</th>";
					string += "<th>";
					string += "Google pagerank";
					string += "</th>";
					string += "<th>";
					string += "Alexa rank";
					string += "</th>";
					string += "</tr>";
					if(list.count()>0)
        		 	{
        		 		for (Domain ar: list) {
							string += "<tr>";
							string += "<td class='text_left'>";
							string += "<a href='/d/"+ar.getDomain()+"'>"+ar.getDomain()+"</a>";
							string += "</td>";
							string += "<td>";
							string += ar.getSpeed()!=null?"<b>"+ar.getSpeed()+"</b>"+" Seconds":"-";
							string += "</td>";
							string += "<td>";
							string += ar.getGooglepr()!=null?ar.getGooglepr():"-";
							string += "</td>";
							string += "<td>";
							string += ar.getAlexa()!=0?nf.format(ar.getAlexa()):"-";
							string += "</td>";
							string += "</tr>";
        		 		}
					}
					string += "</table>";
					out.print(string);
					%>
					
					<div class="clear"></div>
					<h2>Whois ip <%=ip %></h2><br/>
					<%
					if(list.count()>0)
        		 	{
        		 		for (Domain ar: list) {
        		 			if(ar.getWhoisIp()!=null)
        		 				out.print(ar.getWhoisIp().getValue());
        		 			break;
        		 		}
        		 	}
					%>
				</div>
			</div>
			<div class="clear"></div>
		</div>
<script type="text/javascript" src="/js/jquery.js"></script>		
<script type="text/javascript" src="/js/update.js"></script>		
<%@ include file='/layout/footer.jsp'%>		